<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: Message</title>

    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

<h1 class="page-title">Class: Message</h1>


<section>

<header>
    <h2>
        <span class="ancestors"><a href="Messaging.html">Messaging</a>.</span>

        Message
    </h2>

</header>

<article>
<div class="container-overview">


<dt>
<h4 class="name" id="Message"><span class="type-signature"></span>new Message<span
        class="signature">(payload)</span><span class="type-signature"></span></h4>


</dt>
<dd>


<div class="description">
    An application message, sent or received.
    <p>
        All attributes may be null, which implies the default values.
</div>


<h5>Parameters:</h5>


<table class="params">
    <thead>
    <tr>

        <th>Name</th>


        <th>Type</th>


        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>


    <tr>

        <td class="name"><code>payload</code></td>


        <td class="type">


            <span class="param-type">String</span>
            |

            <span class="param-type">ArrayBuffer</span>
            |

            <span class="param-type">Array</span>


        </td>


        <td class="description last">The message data to be sent.
            <p></td>
    </tr>


    </tbody>
</table>


<dl class="details">


<h5 class="subsection-title">Properties:</h5>

<dl>

    <table class="props">
        <thead>
        <tr>

            <th>Name</th>


            <th>Type</th>


            <th class="last">Description</th>
        </tr>
        </thead>

        <tbody>


        <tr>

            <td class="name"><code>payloadString</code></td>


            <td class="type">


                <span class="param-type">string</span>


            </td>


            <td class="description last"><i>read only</i> The payload as a
                string if the payload consists of valid UTF-8 characters.
            </td>
        </tr>


        <tr>

            <td class="name"><code>payloadBytes</code></td>


            <td class="type">


                <span class="param-type">ArrayBuffer</span>


            </td>


            <td class="description last"><i>read only</i> The payload as an
                ArrayBuffer (or an Array of numbers if ArrayBuffers aren't
                supported)
                <p></td>
        </tr>


        <tr>

            <td class="name"><code>destinationName</code></td>


            <td class="type">


                <span class="param-type">string</span>


            </td>


            <td class="description last"><b>mandatory</b> The name of the
                destination to which the message is to be sent (for messages
                about to be sent) or the name of the destination from which the
                message has been received. (for messages received by the
                onMessage function).
                <p></td>
        </tr>


        <tr>

            <td class="name"><code>qos</code></td>


            <td class="type">


                <span class="param-type">number</span>


            </td>


            <td class="description last">The Quality of Service used to deliver the
                message.
                <ol>
                    <li>0 Best effort (default).</li>
                    <li>1 At least once.</li>
                    <li>2 Exactly once.</li>
                </ol>
                <p></td>
        </tr>


        <tr>

            <td class="name"><code>retained</code></td>


            <td class="type">


                <span class="param-type">Boolean</span>


            </td>


            <td class="description last">If true, the message is to be retained by
                the server and delivered to both current and future
                subscriptions. If false the server only delivers the message to
                current subscribers, this is the default for new Messages. A
                received message has the retained boolean set to true if the
                message was published with the retained boolean set to true and
                the subscription was made after the message has been published.
                <p></td>
        </tr>


        <tr>

            <td class="name"><code>duplicate</code></td>


            <td class="type">


                <span class="param-type">Boolean</span>


            </td>


            <td class="description last"><i>read only</i> If true, this message
                might be a duplicate of one which has already been received.
                This is only set on messages received from the server.
            </td>
        </tr>


        </tbody>
    </table>
</dl>


<dt class="tag-source">Source:</dt>
<dd class="tag-source">
    <ul class="dummy">
        <li>
            <a href="mqttCordovaClient.js.html">mqttCordovaClient.js</a>, <a href="mqttCordovaClient.js.html#line1358">line
            1358</a>
        </li>
    </ul>
</dd>


</dl>


</dd>


</div>


</article>

</section>


</div>

<nav>
    <h2><a href="index.html">Index</a></h2>

    <h3>Classes</h3>
    <ul>
        <li><a href="Messaging.Client.html">Client</a></li>
        <li><a href="Messaging.Message.html">Message</a></li>
    </ul>
    <h3>Namespaces</h3>
    <ul>
        <li><a href="Messaging.html">Messaging</a></li>
    </ul>
</nav>

<br clear="both">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha5</a> on Fri Apr 04 2014
    15:56:12 GMT+0900 (China Standard Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"></script>
</body>
</html>